<@master template="/common/master"  title="首页-p2p金融">
    <@include file="/common/head"/>
  	<@head title="提款"/>
    <form id="subForm" method="post"  role="form" class="form-horizontal action-ajax-form" action="/member/submit/withdraw">
	    <div class="tkBlockBox dwb">
	    	<input id="currentBalance" type="hidden" value="${wallet.currentBalance}"/>
	        <div class="bf">可用余额<div class="mt10"><span><@numberFormat value="${wallet.currentBalance}" /></span> 元</div></div>
	        <div class="bf b_lm">冻结金额<div class="mt10"><span><@numberFormat value="${wallet.withdrawFrozen}" /></span> 元</div></div>
	    </div>
	    <div class="czBlockBox mt20">
	        <div class="mt20 bankList">
	            <i class="yhkIco1"></i>
	            银行卡
	            <span class="bankMub">***${bankNo}</span>
	        </div>
	       
	   </div>
	   <div class="h80 c666 plr20">手续费  <span class="red">0.0</span>元（VIP以免0.0元）</div>
	   <div class="txList">
	   		<ul>
	        	<li>提现金额：<input name="amount" type="number" class="p2pInp"></li>
	            <li class="b_t"><span class="fr icon kjIco"></span>提现密码：<input name="password" type="password" class="p2pInp"></li>
	        </ul>
	   </div>
	   <div class="btnBox">
	   		<p id="errorText" class="wrong tac">${errorMsg}</p>
	    	<a id="subBtn" href="#" class="tzBtn">立即提现</a>
	   </div>
	   <div id="confirmDiv" class="bodyBg" style="display:none;">
	    <div class=" tsTxt">
			<a href="#" class="close"></a>
			<div class="tcTxt b_b"><strong>提款确认</strong></div>
		    <p class="tac c999 lh60 mt20">确定提款<span class="red">0</span>元吗?</p>
		    <div class="mt10 pt20">
		    	<a id="confirmBtn" href="#" class="btn60_blue">确定</a><a id="cancelBtn" href="#" class="btn60_glay ml20">取消</a>
		    </div>
	 	</div>
 	</div>
   </form>
</@master>
<@js>
    $(document).ready(function(){
   		$('#cancelBtn').bind("click",function(){
    		$('#confirmDiv').hide();
    	});
    	$('.close').bind("click",function(){
    		$('#confirmDiv').hide();
    	});
    	$('#confirmBtn').bind("click",function(){
    		$('#confirmDiv').hide();
    		$('#loadingDiv').show();
			$('#subForm').submit();
    	});
    	$('#subBtn').bind("click",function(){
    		var rege=/^\d+(\.\d+)?$/;
    		var amount=$('#subForm input[name="amount"]').val();
    		if(!rege.test(amount)){
    			$('#errorText').text('金额格式不对');
    			return false;
    		}
    		var password=$('#subForm input[name="password"]').val();
    		if(!password){
    			$('#errorText').text('交易密码不能为空');
    			return false;
    		}
    		$('#errorText').text('');
    		$('#confirmDiv .red').text(amount);
    		$('#confirmDiv').show();
    	});
	});
</@js>
<@jsRender/>